#include<stdio.h>
int Fn(int n) {
	int a = 1;
	int b = 2;
	int c = 1;
	if (n == 1) {
		return 1;
	}
	if (n == 2) {
		return 2;
	}
	if (n > 2) {
		while (n > 2) {
			c = a + b;
			a = b;
			b = c;
			n--;
		}
		return c;
	}
}
int main() {
	int n = 0;
	int m = 0;
	scanf("%d", &n);
	m = Fn(n);
	printf("%d\n", m);
	return 0;
}
